<!DOCTYPE HTML>
<html>
	<head>
		<title>列表</title>
		<meta charset="UTF-8"/>
	</head>
	<body>
		<h1>通讯录界面</h1>
		<table border="1" cellspacing="0" width="300px">
			<tr>
				<th>姓名</th><th>电话</th>
			</tr>
			<?php
			session_start();
			if (isset($_SESSION['user'])) {

				$list = array();
				$list['zhangsan'] = '0391-876998-002';
				$list['lisi'] = '10086';
				$list['wangwu'] = '0391-10010-002';
				$list['zhaoliu'] = '0391-10000-002';
				$list['tianqi'] = '0391-119-002';

				foreach ($list as $k => $v) {
					echo "<tr><td> $k </td><td> $v </td></tr>";
				}
			}else{
				echo '<meta http-equiv="refresh" content="2;url=index.php"/>';
				echo '用户尚未登陆！';
			}
			?>
		</table>
	</body>
</html>